package com.luct.view;

import com.luct.customview.R;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.TextView;

public class MyView extends TextView {

	public MyView(Context context, AttributeSet attrs) {
		super(context, attrs);
		
		TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.MyView);
		String text = ta.getString(R.styleable.MyView_android_text);
		int testAttr = ta.getInteger(R.styleable.MyView_testAttr, 0);
		
		System.out.println("--> text = " + text + "|| testAttr = " + testAttr);
		
		ta.recycle();
	}

	public MyView(Context context, AttributeSet attrs, int defStyleAttr,
			int defStyleRes) {
		super(context, attrs, defStyleAttr, defStyleRes);
	}

	public MyView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public MyView(Context context) {
		super(context);
	}
	

}
